package com.chen.project.file_server.pojo;

import com.alibaba.fastjson.annotation.JSONType;

import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

/**
 * 文件元数据的实体类
 *
 * @author AUSA
 */
@JSONType(orders = {"id", "fileOriName", "fileSize", "fileType", "createTime", "savePath", "envelope", "uuid"})
public class FileInfo {

    private Integer id;
    private String fileOriName;
    /**
     * 单位是 字节
     */
    private Long fileSize;
    private String fileType;
    private Timestamp createTime;
    private String savePath;
    private String envelope;
    private String uuid;

    public FileInfo() {
    }

    public FileInfo(String fileOriName, Long fileSize, String fileType, Timestamp createTime, String savePath, String envelope, String uuid) {
        this.fileOriName = fileOriName;
        this.fileSize = fileSize;
        this.fileType = fileType;
        this.createTime = createTime;
        this.savePath = savePath;
        this.envelope = envelope;
        this.uuid = uuid;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFileOriName() {
        return fileOriName;
    }

    public void setFileOriName(String fileOriName) {
        this.fileOriName = fileOriName;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public String getSavePath() {
        return savePath;
    }

    public void setSavePath(String savePath) {
        this.savePath = savePath;
    }

    public String getEnvelope() {
        return envelope;
    }

    public void setEnvelope(String envelope) {
        this.envelope = envelope;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Override
    public String toString() {
        return "FileInfo{" +
                "id=" + id +
                ", fileOriName='" + fileOriName + '\'' +
                ", fileSize=" + fileSize +
                ", fileType='" + fileType + '\'' +
                ", createTime=" + createTime +
                ", savePath='" + savePath + '\'' +
                ", envelope='" + envelope + '\'' +
                ", uuid='" + uuid + '\'' +
                '}';
    }
}
